home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 15 code / 3D Interface / 3D Buttons CDEF / Source / 3D Buttons CDEF source / (3D Buttons CDEF.π) / LGBControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-27  |  998 b   |  48 lines  |  [TEXT/MMCC]

  1. /**************************************************************************
  2.     LGBControl
  3.     
  4.     Public domain, by Zig Zichterman.
  5.     
  6.     Just a few utilities that the control classes use.
  7.     
  8.     Some of the drawing code is taken from the public domain source
  9.     accompanying _develop_ 15.
  10.  
  11.     1.0b5
  12.         11/27/94    zz    h    add CalcBackgroundColor()
  13. **************************************************************************/
  14. #pragma once
  15.  
  16. class LGBControl {
  17.  
  18.     // ———— Draw Utilities ———————————————————————————————————————————
  19.     public :
  20.         static short
  21.         CountLines(
  22.             const StringPtr inString);
  23.             
  24.         static short
  25.         TitleHeight(
  26.             const StringPtr inTitle);
  27.             
  28.         static void
  29.         SetupFont(void)
  30.             {
  31.                 ::TextFont(systemFont);
  32.                 ::TextSize(0);
  33.             }
  34.             
  35.         static void
  36.         CalcBoxes(
  37.             const Rect        &inControlRect,
  38.             const StringPtr    inTitle,
  39.             Rect            &outCheckbox,
  40.             Rect            &outTitleRect);
  41.  
  42.         static void
  43.         CalcBackgroundColor(
  44.             const ControlHandle    inControl,
  45.             const WindowPtr        inWindow,
  46.             RGBColor            &outColor);
  47. };
  48.